package com.zpark.merchant.service.convert;

import com.zpark.merchant.api.dto.MerchantDTO;
import com.zpark.merchant.service.entity.Merchant;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * Merchant对象转换接口类
 */
@Mapper
public interface MerchantConvert {

    // 定义转换对象的实例
    MerchantConvert INSTANCE = Mappers.getMapper(MerchantConvert.class);

    // MerchantDTO转为Merchant对象
    Merchant merchantDtoToMerchant(MerchantDTO dto);

    // Merchant转为MerchantDTO对象
    MerchantDTO merchantToMerchantDto(Merchant merchant);
}
